import axios from "./api";

export const getnavlinks = async () => {
    try {
        const response = await axios.get('/api/get-navlinks');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getData = async () => {
    try {
        const response = await axios.get('/api/get-datalists');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getDatalist2 = async () => {
    try {
        const response = await axios.get('/api/get-datalist2');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getimgData = async () => {
    try {
        const response = await axios.get('/api/get-imgData');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getleftlist = async () => {
    try {
        const response = await axios.get('/api/get-left_List');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getnewdatalist = async () => {
    try {
        const response = await axios.get('/api/get-newdatalist');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getbotAiListData = async () => {
    try {
        const response = await axios.get('/api/get-botAiListData');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const gettuiJianList = async () => {
    try {
        const response = await axios.get('/api/get-tuiJianList');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getbotListData = async () => {
    try {
        const response = await axios.get('/api/get-botListData');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getzuozhelist = async () => {
    try {
        const response = await axios.get('/api/get-zuozhelist');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const gettuiJianHuatiData = async () => {
    try {
        const response = await axios.get('/api/get-tuiJianHuatiData');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getwenzhangbangLists = async () => {
    try {
        const response = await axios.get('/api/get-wenzhangbangLists');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getnewtuiJianHuatiData = async () => {
    try {
        const response = await axios.get('/api/get-newtuiJianHuatiData');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};

export const getnewwenzhangbangLists = async () => {
    try {
        const response = await axios.get('/api/get-newwenzhangbangLists');
        return response.data.data
    } catch (error: any) {
        console.error('获取数据失败:', error.message);
    }
};